package com.homework.vehicle.Auto;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/26 19:21
 * @description
 */
public class Car extends AutoMobile{
    private String car;

    public Car() {
    }

    public Car(String type, String car) {
        super(type);
        this.car = car;
    }

    public String getCar() {
        return car;
    }

    public void setCar(String car) {
        this.car = car;
    }

    @Override
    public void getInfo(){
        System.out.print(getType()+car);
    }
    @Override
    public void atk() {
        System.out.println("无法攻击");
    }

    @Override
    public String toString() {
        return "Car{" +
                "car='" + car + '\'' +
                '}';
    }
}
